package com.qcby.model.dto;

import java.math.BigDecimal;
import java.sql.Timestamp;

import lombok.*;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class ScreeningOrganizeCreateDto {

    private Integer hId;

    private Integer mid;

    private Timestamp beginTime;

    private Timestamp endTime;

    private BigDecimal price;

    public Boolean isValid() {
        return this.hId == null ||
            this.mid == null ||
            this.beginTime == null ||
            this.endTime == null ||
            this.beginTime.after(this.endTime) ||
            this.beginTime.equals(this.endTime) ||
            this.price == null ||
            this.price.compareTo(BigDecimal.ZERO) <= 0;
    }

}
